{block name="content"}
<link rel="stylesheet" href="/assets/js/bootstrapvalidator/css/bootstrapValidator.min.css">
<link rel="stylesheet" href="/assets/css/backend.css">
<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <div class="panel-lead"><em>自动排课</em></div>
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <form id="generate-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('course/schedule/generate')}">
                    <div class="form-group">
                        <label for="publicwelfare_id" class="control-label col-xs-12 col-sm-2">项目:</label>
                        <div class="col-xs-12 col-sm-8">
                            <select class="form-control" id="publicwelfare_id" name="publicwelfare_id" required>
                                {foreach name="publicwelfareList" item="item"}
                                <option value="{$item.id}" {if $publicwelfare_id==$item.id}selected{/if}>{$item.project_name}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <div class="alert alert-warning">
                                <strong>注意!</strong> 自动排课将会清除当前月份的所有排课数据，并重新生成。请确认后再操作。
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <button type="button" class="btn btn-success btn-embossed" id="generate-btn">开始自动排课</button>
                            <button type="reset" class="btn btn-default btn-embossed">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}
